package com.smile.controller;

import com.smile.pojo.Course;
import com.smile.pojo.Oss;
import com.smile.pojo.User;
import com.smile.service.OssService;
import com.smile.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class OssController {

    @Autowired
    private OssService ossService;


    @GetMapping("/queryOssList")
    public List<Oss> getUserList(){

//        System.out.println( "1111111111");
        List<Oss> osses = ossService.queryOssList();
        return osses;
    }

    @RequestMapping("/queryCourseList/{id}")
    public List<Course> GetCourseList(@PathVariable Integer id){
        List<Course> courses = ossService.queryCourseList(id);
        return courses;
    }



}
